<extend file='../master'/>
<block name="content">
    <form action="" method="post" id="module" ng-controller="moduleCtrl" class="form-horizontal" role="form">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">消息管理</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">关键词</label>
                    <div class="col-sm-10">
                        <input type="text" name="keyword" class="form-control" id="" placeholder="">
                    </div>
                </div>
            </div>
        </div>
        {{$messageFile}}
        <div class="form-group">
            <div style="float: right;margin-right: 20px">
                <button type="submit" class="btn btn-primary">保存</button>
            </div>
        </div>

    </form>
</block>
<script>
    require(['angular','util'],function (angular, util) {
        angular.module('module', []).controller('moduleCtrl', ['$scope', function ($scope) {
//            检测是否存在module
            if(jQuery.isFunction(module)){
                module($scope);
            }
            $('form').submit(function () {
                if (jQuery.isFunction(submit)) {
                    submit($scope);
                }
            })

        }]);
        angular.bootstrap(document.getElementById('module'),['module']);
    })
</script>



